<?php
/*
 * @Descripttion: 
 * @version: 1.0
 * @Author: Sam
 * date: 2020-11-16 16:21:19
 * @LastEditors: Sam
 * @LastEditTime: 2021-12-21 17:27:41
 */
use think\facade\Route;

Route::group(function(){
//    Route::post('login', 'oauth/oauth_login'); //授权
//    Route::post('get_session_key', 'oauth/get_session_key'); //授权
    //对外
    Route::post('statistics/recharge_statistics','statistics/recharge_statistics');    //
    Route::get('login','oauth/index');    //授权登录
    Route::get('user_info','oauth/user_info');    //授权登录
    Route::get('banner','Index/banner');    //首页轮播图
    Route::get('works_index','Index/works_index');    //首页优选好剧
    Route::get('works_see_log','Index/works_see_log');    //追剧-最近观看
    Route::get('binge_watching','Index/binge_watching');    //追剧-最近观看
    Route::get('video_list','Index/video_list');    //视频详情
    Route::get('grab_files/web_grabs','GrabFiles/webGrabs');    //视频详情
});


Route::group(function(){
    Route::post('perfect_info', 'oauth/perfect_info'); //更新头像昵称
    Route::post('de_unionid', 'oauth/de_unionid'); //解密unionid
    Route::post('de_mobile', 'oauth/de_mobile'); //解密手机号


})->middleware(\app\api\middleware\TokenMiddleware::class,true)->allowCrossDomain();


Route::miss(function() {
    return json(['code'=>-1,'msg'=>'非法请求']);
});

